package com.ericsson.enap.modules.enm.service.impl;

import com.ericsson.enap.modules.enm.entity.EnipEnmKpiAlarmCondition;
import com.ericsson.enap.modules.enm.mapper.EnipEnmKpiAlarmConditionMapper;
import com.ericsson.enap.modules.enm.service.IEnipEnmKpiAlarmConditionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 告警配置Service业务层处理
 *
 * @author ruoyi
 * @date 2022-02-25
 */
@Service
public class EnipEnmKpiAlarmConditionServiceImpl implements IEnipEnmKpiAlarmConditionService {

    @Autowired
    private EnipEnmKpiAlarmConditionMapper enipEnmKpiAlarmConditionMapper;

    /**
     * 查询告警配置
     *
     * @param id 告警配置ID
     * @return 告警配置
     */
    @Override
    public EnipEnmKpiAlarmCondition selectEnipEnmKpiAlarmConditionById(Long id) {
        return enipEnmKpiAlarmConditionMapper.selectEnipEnmKpiAlarmConditionById(id);
    }

    /**
     * 查询告警配置列表
     *
     * @param enipEnmKpiAlarmCondition 告警配置
     * @return 告警配置
     */
    @Override
    public List<EnipEnmKpiAlarmCondition> selectEnipEnmKpiAlarmConditionList(EnipEnmKpiAlarmCondition enipEnmKpiAlarmCondition) {
        return enipEnmKpiAlarmConditionMapper.selectEnipEnmKpiAlarmConditionList(enipEnmKpiAlarmCondition);
    }

    /**
     * 新增告警配置
     *
     * @param enipEnmKpiAlarmCondition 告警配置
     * @return 结果
     */
    @Override
    public int insertEnipEnmKpiAlarmCondition(EnipEnmKpiAlarmCondition enipEnmKpiAlarmCondition) {
        return enipEnmKpiAlarmConditionMapper.insertEnipEnmKpiAlarmCondition(enipEnmKpiAlarmCondition);
    }

    /**
     * 修改告警配置
     *
     * @param enipEnmKpiAlarmCondition 告警配置
     * @return 结果
     */
    @Override
    public int updateEnipEnmKpiAlarmCondition(EnipEnmKpiAlarmCondition enipEnmKpiAlarmCondition) {
        return enipEnmKpiAlarmConditionMapper.updateEnipEnmKpiAlarmCondition(enipEnmKpiAlarmCondition);
    }

    /**
     * 批量删除告警配置
     *
     * @param ids 需要删除的告警配置ID
     * @return 结果
     */
    @Override
    public int deleteEnipEnmKpiAlarmConditionByIds(Long[] ids) {
        return enipEnmKpiAlarmConditionMapper.deleteEnipEnmKpiAlarmConditionByIds(ids);
    }

    /**
     * 删除告警配置信息
     *
     * @param id 告警配置ID
     * @return 结果
     */
    @Override
    public int deleteEnipEnmKpiAlarmConditionById(Long id) {
        return enipEnmKpiAlarmConditionMapper.deleteEnipEnmKpiAlarmConditionById(id);
    }
}
